@import '@src/assets/style/theme.css';

.toolbar-button {
  @apply h-10 w-10 text-center rounded-lg hover:bg-muted/80 hover:highlight-white/10 hover:text-foreground transition inline-flex items-center justify-center;
  position: relative;

  &.indicator {
    &::before {
      content: '';
      height: 3px;
      left: 50%;
      transform: translateX(-50%);
      bottom: 0;
      position: absolute;
      background-color: theme('colors.muted.DEFAULT');
      transition: all 250ms ease;
      @apply w-2/12 rounded-full;
    }
    &.active::before {
      background-color: theme('colors.primary.DEFAULT');
      @apply w-5/12;
    }
  }
  &.active {

    @apply text-primary;
  }

  svg {
    width: theme('size.5');
    height: theme('size.5');
  }
}

.cm-editor {
  .cm-activeLineGutter,
  .cm-activeLine {
    background-color: transparent !important;
  }

  &.cm-focused {
    outline: none !important;

    .cm-activeLineGutter {
      @apply bg-muted/90 !important;
    }
    .cm-activeLine {
      @apply bg-muted/60 !important;
    }
  }

  .cm-content {
    font-family: theme('fontFamily.mono');
  }
  .cm-line {
    @apply py-0.5 rounded-r !important;
  }
  .cm-gutterElement {
    @apply rounded-l px-1;

    input[type='checkbox'] {
      appearance: none;
      width: 18px;
      height: 18px;
      margin-top: 3px;
      @apply border rounded bg-input/40 border-white/10;

      &:hover,
      &:checked {
        @apply bg-primary/20 border-primary/60;
      }
      &:checked {
        background-size: 100% 100%;
        background-position: center;
        background-image: url('');
      }
    }
  }
}

.list-enter-active,
.list-leave-active {
  transition: all 0.5s ease;
}
.list-enter-from,
.list-leave-to {
  opacity: 0;
  transform: translateY(30px);
}